//request.js
import request from '@/utils/request'


// 接口函数建议使用 const 箭头函数写法，因为 function 重复覆盖没有提示
export const homeSwiper = () => {
    return request({
        method: 'GET',
        url: '/home/swiperdata'
    })
}
export const homeCatitems = () => {
    return request({
        method: 'GET',
        url: '/home/catitems'
    })
}
export const homeFloordata = () => {
    return request({
        method: 'GET',
        url: '/home/floordata'
    })
}

// 获取商品列表
export const getGoodsList = (data) => {
    return request({
        method: 'GET',
        url:'/goods/search',
        data
    })
}

// 获取商品详情
export const getGoodsDetail = (data) => {
    return request({
        method: 'GET',
        url:'/goods/detail',
        data
    })
}


